﻿package org.openChart.sprite 
{
	import flash.geom.Point;
	import flash.events.MouseEvent;
	import org.openChart.display.DisplayAxis;
	import org.openChart.display.DisplayBaseObject;
	
	/**
	 * ...
	 * @author Chongyuan
	 */
	public class AxisLineSprite extends MouseEventSprite
	{
	
		public function AxisLineSprite(displayObject:DisplayBaseObject, commandHandler:CommandHandler ) 
		{
			super(displayObject, commandHandler);
		}
		
		public override function paint():void
		{
			var axis:DisplayAxis = displayObject as DisplayAxis;
			drawLine(axis.startPoint.x, axis.startPoint.y, axis.endPoint.x, axis.endPoint.y, 2, axis.color, 1);
		}
		
		public override function mouseUp(event:MouseEvent):void
		{
			
		}
		public override function mouseOver(event:MouseEvent):void
		{
			trace("mouse over the axis");
		}
		public override function mouseDown(event:MouseEvent):void
		{
			//stage.addEventListener(MouseEvent.MOUSE_MOVE, turning);
			//stage.addEventListener(MouseEvent.MOUSE_UP, addMouseUp);
		}
		
		public function draging(event:MouseEvent):void
		{
			//commandHandler.processCommand(Command.TUNING_PIE_CHART, this);
		}
		
		public function addMouseUp(event:MouseEvent):void
		{
			//stage.removeEventListener(MouseEvent.MOUSE_MOVE, turning);
			//stage.removeEventListener(MouseEvent.MOUSE_UP, addMouseUp);
		}
	}
	
}